/*
 *    Copyright (c) 2018-2025, lengleng All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pie4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: lengleng (wangiegie@gmail.com)
 */

package com.pie4cloud.pie.admin.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.pie4cloud.pie.common.mybatis.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 文件管理
 *
 * @author Luckly
 * @date 2019-06-18 17:18:42
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "SYS_FILE")
public class SysFile extends BaseEntity {

	private static final long serialVersionUID = 1L;

	/**
	 * 编号
	 */
	@Id
	@Column(name = "ID",length = 11)
	@TableId(value = "id", type = IdType.ASSIGN_ID)
	private Long id;

	/**
	 * 文件名
	 */
	@Column(name = "FILE_NAME",length = 100)
	private String fileName;

	/**
	 * 原文件名
	 */
	@Column(name = "ORIGINAL",length = 100)
	private String original;

	/**
	 * 容器名称
	 */
	@Column(name = "BUCKET_NAME",length = 200)
	private String bucketName;

	/**
	 * 文件类型
	 */
	@Column(name = "TYPE",length = 50)
	private String type;

	/**
	 * 文件大小
	 */
	@Column(name = "FILE_SIZE",length = 20)
	private Long fileSize;

	/**
	 * 删除标识：1-删除，0-正常
	 */
	@TableLogic
	@Column(name = "DEL_FLAG",length = 1,columnDefinition = "VARCHAR(1) DEFAULT '0'")
	private Integer delFlag;

}
